package com.abc.config;

import com.abc.service.VectorStoreService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 向量存储初始化器
 * 在应用启动时初始化向量存储
 *
 * @author abc
 * @since 2024-01-01
 */
@Slf4j
@Component
public class VectorStoreInitializer implements CommandLineRunner {

    @Autowired
    private VectorStoreService vectorStoreService;

    @Override
    public void run(String... args) {
        vectorStoreService.initializeVectorStore();
    }
}

